<template>
    <div class="top_go_back" :class="{opacity:isOpacity === true}">
      <div @click="goBack" class="iconfont icon-icon4"></div>
      <div @click="openSheetModal" class="iconfont icon-more"></div>
    </div>
</template>

<script>
  export default {
    name: 'TopGoBack',
    props:{
      // sheetTest:{
      //   type:Function
      // },
      isOpacity:{
        type: Boolean,
        default:true
      }
    },
    beforeRouteLeave(to, from, next) {
      to.meta.keepAlive = true;
      next();
    },
    methods:{
      goBack(){
        this.$router.go(-1)
      },
      openSheetModal(){
        let that = this;
        this.$store.state.dialog.sheetVisibleShow = true;
      }
    }
  }
</script>

<style scoped>
.top_go_back{
  display: flex;
  justify-content: space-between;
  padding:0 10px;
  font-size: 1rem;
}
  .top_go_back>div{
    background-color: #000000;
    height: 30px;
    color: #ffffff;
    line-height: 30px;
    text-align: center;
    width: 30px;
    border-radius: 50%;

  }
  .opacity{
    opacity: 0.5;
  }
</style>
